The present invention relates to a shading correction apparatus for correcting shading of image data obtained by reading an image, using shading data obtained by reading a white reference plate, and an image read apparatus.
FIG. 8 is a view schematically showing the internal arrangement of an image read apparatus such as a copying machine using a CCD. In this image read apparatus, an original 1 placed on an original table 2 is irradiated with a lamp 3. The light reflected by the original is incident on a CCD sensor unit 8 through mirrors 4, 5, and 6 and a lens unit 7. The CCD sensor unit 8 reads the original image.
For the image data of the read original image, shading due to the characteristics of the mechanical and optical systems need be corrected. The shading is corrected using shading data obtained by reading a white reference plate 9 shown in FIG. 8 by the CCD sensor unit 8 having a plurality of pixels.
In the conventional shading correction by the above method, shading data is read by the CCD sensor unit 8 a plurality of number of times at the fixed position of the white reference plate 9. The average value of shading data is obtained in units of pixels of the CCD sensor unit 8. A shading correction coefficient (shading correction data) at each pixel position is calculated by comparing the average value with the target shading value (ideal value). In reading an image, image data obtained from a corresponding pixel of the CCD sensor unit 8 is multiplied by the shading correction coefficient, thereby correcting shading.
FIG. 9 is a graph for explaining the relationship between the average value of shading data obtained by reading the white reference plate 9 and the data value after shading correction. The broken line indicates the ideal value (level) of the shading value (data) when the white plate is read. The bold arrows indicate the average values of shading data at the respective pixel positions (P1 to P9). Since the shading correction coefficient at each pixel position=target value/average value, shading-corrected data (in this case, the target value) can be obtained, as indicated by each thin arrow in FIG. 9, by multiplying the average value of shading data by a corresponding shading correction coefficient. FIG. 10 shows an example of image data (bold arrows) obtained by reading the original and data (thin arrows) obtained by shading-correcting the image data using the obtained shading correction coefficients.
However, in the above-described conventional shading correction, the shading cannot be appropriately corrected when the light source largely degrades or obstacles such as large dust particles are present on the optical path. FIG. 11 is a graph showing the average value of shading data and shading-corrected data at each pixel position when an obstacle is present at a position corresponding to the pixel position P5 on the white reference plate. As shown in FIG. 11, at the pixel position P5, data supposed to be obtained has a signal level indicated by the circle of broken line. In fact, data having a signal level much lower than that indicated by the circle of broken line is obtained due to the obstacle. In this case, as is apparent from the thin arrow, a shading correction coefficient much larger than the necessary shading correction coefficient is calculated to correct the data at the pixel position P5 to the target value.
FIG. 12 is a graph showing a case wherein image data (the same as in FIG. 10) read from the original is shading-corrected using a shading correction coefficient obtained on the basis of the shading data shown in FIG. 11. As shown in FIG. 12, when the image data at the pixel position P5 is shading-corrected, the data is multiplied by the shading correction coefficient larger than the necessary shading correction coefficient. For this reason, the signal level becomes higher than the signal level (circle of broken line) supposed to be obtained.
To solve the above problem, a method has been proposed in which shading data is read at a plurality of positions shifted on the white reference plate in the sub-scanning direction, and the average value of shading data is obtained in units of pixels, thereby eliminating the influence of degradation in light source or obstacles on the optical path. FIG. 13 shows shading data read at a plurality of positions on the white reference plate and the average value of shading data at the respective pixel positions on the CCD sensor unit 8 when an obstacle is present at a position corresponding to the pixel position P5 on the white reference plate at a certain read position. FIG. 14 is a graph showing a case wherein the image data (the same as in FIG. 10) read from the original is shading-corrected using a shading correction coefficient obtained on the basis of these average values.
As shown in FIGS. 13 and 14, when the shading data read at different positions on the white reference plate are averaged, the influence of an obstacle can be reduced, as compared to the case shown in FIGS. 11 and 12.
However, when a large obstacle is present on the white reference plate, appropriate shading correction cannot be performed by this method of averaging shading data read at a plurality of positions on the white reference plate.
FIG. 15 shows values obtained by averaging shading data read by the method described with reference to FIG. 13 when a large obstacle is present on the white reference plate. FIG. 16 is a graph showing image data obtained by shading correction using the average values.
The present invention has been made in consideration of the above situation, and has as its object of the present invention to provide a shading correction apparatus and method capable of minimizing the influence of a dust particle on a white reference plate and always performing optimum shading correction, and an image read apparatus using the shading correction apparatus.
According to the present invention, the foregoing object is attained by providing a shading correction apparatus for performing shading correction of data obtained by reading an original using shading data obtained by reading a white reference plate by an image sensor, the apparatus characterized by comprising: first correction data acquisition means for obtaining correction data to be used for shading correction using the shading data obtained by reading the white reference plate in a first direction and a second direction perpendicular to the first direction; second correction data acquisition means for obtaining correction data to be used for shading correction using the shading data obtained by reading the white reference plate in the first direction; and selection means for selecting one of the first correction data acquisition means and the second correction data acquisition means.
According to the present invention, the foregoing object is also attained by providing an image read apparatus for performing shading correction of data obtained by reading an original using shading data obtained by reading a white reference plate by an image sensor, the apparatus characterized by comprising: first correction data acquisition means for obtaining correction data to be used for shading correction using the shading data obtained by reading the white reference plate in a first direction and a second direction perpendicular to the first direction; second correction data acquisition means for obtaining correction data to be used for shading correction using the shading data obtained by reading the white reference plate in the first direction; and selection means for selecting one of said first correction data acquisition means and the second correction data acquisition means.
Further, the foregoing object is also attained by providing a shading correction method of performing shading correction of data obtained by reading an original using shading data obtained by reading a white reference plate by an image sensor, the method characterized by comprising: the first correction data acquisition step of obtaining correction data to be used for shading correction using the shading data obtained by reading the white reference plate in a first direction and a second direction perpendicular to the first direction; the second correction data acquisition step of obtaining correction data to be used for shading correction using the shading data obtained by reading the white reference plate in the first direction; and the selection step of selecting one of the first correction data acquisition step and the second correction data acquisition step.